/**
 *    Copyright (C) 2009  Victor Smirnov <aist11@gmail.com>
 *
 *    This program is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License along
 *    with this program; if not, write to the Free Software Foundation, Inc.,
 *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 *    See LICENSE.exceptions in the root folder of this project for possible
 *    exceptions
 *
 */

#ifndef _CUBEFS_CORE_MODELS_BLOB_MAP_TOOLS_HPP
#define _CUBEFS_CORE_MODELS_BLOB_MAP_TOOLS_HPP

namespace cubefs    {
namespace models    {
namespace blob_map  {

struct CountData {

};

template <typename CountData, Int Indexes = 1>
class BufferContentDescriptor {

    CountData base_prefix_;
    BigInt length_;
    BigInt offset_;
    BigInt start_;

    BigInt indexes_[Indexes];

public:

    BufferContentDescriptor(): length_(0), offset_(0), start_(0) {}

    BigInt* indexes() {
        return indexes_;
    }

    const BigInt* indexes() const {
        return indexes_;
    }

    const CountData& base_prefix() const {
        return base_prefix_;
    }

    CountData& base_prefix() {
        return base_prefix_;
    }

    const BigInt& length() const {
        return length_;
    }

    BigInt& length() {
        return length_;
    }

    const BigInt& offset() const {
        return offset_;
    }

    BigInt& offset() {
        return offset_;
    }
    
    const BigInt& start() const {
        return start_;
    }

    BigInt& start() {
        return start_;
    }
};



}
}
}

#endif